package com.alibaba.demo.web;

import com.alibaba.cola.dto.Response;
import com.alibaba.demo.api.IotServiceI;
import com.alibaba.demo.dto.command.IotServiceAddCmd;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 * @date 2024/4/28 09:50
 * @description
 */
@RestController
public class IotServiceController {

    @Resource
    private IotServiceI iotService;

    @PostMapping("add")
    public Response serviceAdd(@RequestBody @Validated IotServiceAddCmd cmd) {
        return iotService.addService(cmd);
    }
}
